<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
            "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>



<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META name="GENERATOR" content="hevea 1.08">
<LINK rel="stylesheet" type="text/css" href="embroot.css">
<TITLE>
Initialising the ECLiPSe Subsystem
</TITLE>
</HEAD>
<BODY >
<A HREF="embroot017.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="embroot016.html"><IMG SRC ="contents_motif.gif" ALT="Up"></A>
<A HREF="embroot019.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
<HR>

<H2 CLASS="section"><A NAME="htoc35">5.2</A>&nbsp;&nbsp;Initialising the ECL<SUP><I>i</I></SUP>PS<SUP><I>e</I></SUP> Subsystem</H2>
These are the Tcl commands needed to initialize an embedded ECL<SUP><I>i</I></SUP>PS<SUP><I>e</I></SUP>.
<DL CLASS="description" COMPACT=compact><DT CLASS="dt-description">
<A NAME="@default77"></A><B>ec_set_option <I>option_name option_value</I></B><DD CLASS="dd-description"><BR>
Set the value of an initialisation option for ECL<SUP><I>i</I></SUP>PS<SUP><I>e</I></SUP>.
 This must be done before invoking ec_init.
 The available option_names are:
 localsize, globalsize, privatesize, sharedsize,
 default_module, eclipsedir, io.
	See Appendix <A HREF="embroot064.html#chapecoptions">A</A> for their meaning.<BR>
<BR>
<DT CLASS="dt-description"><A NAME="@default78"></A><B>ec_init <I>?peername?</I></B><DD CLASS="dd-description"><BR>
Initialise the ECL<SUP><I>i</I></SUP>PS<SUP><I>e</I></SUP> engine. This is required before any other
 commands of this interface (except ec_set_option) can be used. The
	optional argument <I>peername</I> is the name of the embedding peer,
 which defaults to `master'.
</DL>
Example Tcl code for initialising ECL<SUP><I>i</I></SUP>PS<SUP><I>e</I></SUP>:
<BLOCKQUOTE CLASS="quote"><PRE CLASS="verbatim">
lappend auto_path "/location/of/my/eclipse/lib_tcl"
package require eclipse
#ec_set_option io 0;    # input/output/error via tty (for testing)
ec_set_option io 2;     # input/output/error via queues (default)
ec_init
</PRE></BLOCKQUOTE>
Apart from the basic functionality in <B>package eclipse</B> which
takes care of linking Tcl to ECL<SUP><I>i</I></SUP>PS<SUP><I>e</I></SUP>, there is a
<A NAME="@default79"></A>
<B>package eclipse_tools</B> containing Tk interfaces to
ECL<SUP><I>i</I></SUP>PS<SUP><I>e</I></SUP> facilities like debugging and development support.
This package should be used when developing Tcl/Tk/ECL<SUP><I>i</I></SUP>PS<SUP><I>e</I></SUP> applications.
To add these tools to your application, load the package and add the
tools menu to your application's menu bar. Your code should then
contain the following pattern:
<BLOCKQUOTE CLASS="quote"><PRE CLASS="verbatim">
package require eclipse
package require eclipse_tools
...
menu .mbar
...
ec_init
...
ec_tools_init .mbar.tools
</PRE></BLOCKQUOTE>
See also the examples in the lib_tcl directory of the ECL<SUP><I>i</I></SUP>PS<SUP><I>e</I></SUP> installation.<BR>
<BR>
<HR>
<A HREF="embroot017.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="embroot016.html"><IMG SRC ="contents_motif.gif" ALT="Up"></A>
<A HREF="embroot019.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
</BODY>
</HTML>
